<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>比康医箱</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link href="../static/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<link rel="stylesheet" href="../static/css/font-awesome.min.css" />
<link rel="stylesheet" href="../static/css/app.css" id="maincss">
<link rel="stylesheet" type="text/css" href="../static/css/button.css">
<link rel="stylesheet" type="text/css" href="../static/css/dialog.css">
<link rel="stylesheet" type="text/css" href="../static/css/pagination.css">
<link rel="stylesheet" type="text/css" href="../static/css/common-style.css">
<script type="text/javascript">
	var path = '';		
</script>
<script src="../static/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="../static/js/jquery.validator.min.js"></script>
<script type="text/javascript" src="../static/js/zh-CN.js"></script>
<script src="../static/js/jquery.cookie.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../static/js/jquery.storageapi.js"></script>
<script  type="text/javascript" src="../static/js/app.js"></script>
<script src="../static/js/common.js"></script>
<script src="../static/js/common-getInfo.js"></script>
<script src="../static/js/common-validate.js"></script>
<script src="../static/js/common-util.js"></script>
<script src="../static/js/common-dataBind.js"></script>
<script src="../static/js/jquery.PrintArea.js"></script>
<script language="javascript" type="text/javascript">
/**获取是否在客户端标志
 * sessionStorage 根据打开浏览器时获取参数*/
function getKeHudbz() {
	var keHudURL =$('#mainIframe').context.referrer;
	function getValue(url, name) {
	    var reg = new RegExp('(\\?|&)' + name + '=([^&?]*)', 'i');
	    var arr = url.match(reg);
	    if (arr) {
	        return arr[2];
	    }
	    return null;
	}
	var where = getValue(keHudURL, 'where');
	if (where != null) {
		if(where == "Q8gmoUGvFHpoSA43EVyVkg==") {
			sessionStorage.setItem('isKeHud', true);
		} else {
			sessionStorage.setItem('isKeHud', false);
		}
	} 
	if (sessionStorage.getItem('isKeHud') == 'true'){
		return true;
	} else if (sessionStorage.getItem('isKeHud') == 'false') {
		return false;;
	}
}
// 客户端标志
var isKeHud = getKeHudbz();
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
var s;
(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s = ua
		.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] : (s = ua
		.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] : (s = ua
		.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] : (s = ua
		.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
		
//以下进行测试
if (Sys.chrome) {
	//document.write('Chrome: ' + Sys.chrome.substr(0,2));
	//目前Chrome浏览器需要判断支持情况
	var banBenHao = Sys.chrome.substr(0, 2);
	if (parseInt(banBenHao) >= 40) {
		//版本号大于53,跳转到登录页
	} else {
		//版本号小于53,跳转到支持页
		window.location.href="/jump/toZhichi"; 
	}
}
if(!Sys.safari&&!Sys.chrome){
	//其他浏览器，都不支持
	window.location.href="/jump/toZhichi"; 
}
</script>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
	</head>
	<body>
	<input id="yb-init" style="display: none" value=""/>
	</body>
</html>

	<link rel="stylesheet" href="../static/css/common-fs.css">
	<link rel="stylesheet" href="../static/css/xuanzezs.css">
	<link rel="stylesheet" type="text/css" href="../static/css/header.css"></head>
<body>
	<header class="header clearfix">
			<div class="h-container" style="float:left;margin:0;">
				<img src="../static/image/bk_logox.png" alt="logo" class="h-logo">
				<span class="g-cloudclinic" style="vertical-align: middle;">比康医箱</span>
				<div class="h-help-ect">
	              <div class="h-doctor my-message" id="m-message" style="margin-right:0; border-bottom:solid 4px #097c25;">
	              		<span id="helloworld" style="color:#fff;">1357...</span> 
	              		<i class="fa fa-caret-right fa-lg" aria-hidden="true" style="color:#fff;"></i>
	              		<ul class="pull-down-list">
	              			<li><a href="toZhanghaoxxDl.jsp?flag=2">帐户信息</a></li>
	              			<li><a href="/yonghu/tuichu">退出</a></li>
	              		</ul>
	              </div>
	            </div>
			</div>
		</header>
						
	 <div class="g-container main-scroll" style="min-height:100%;">
		
		<div class="">
	   <div class="g-main " style="margin:60px auto;">
				<div class="my-clinic">
					<span>我的诊所</span>
				</div>
				<div class="mycc-main clearfix">
					
					
						<div class="s-clinic-name">
						
							
							
								
									<div class="mym-circle-zheng mym-circle-shi">试</div>
								
								
							
						
						<a id="327" class="toZhensuoIndex" leixing="yongyou"  href="#"><span class="sc-zsname">强强电疗所</span>
						<span class="xuanzzs-dz">
							
							
							口腔门诊
							
						</span>
						
						
								<span class="xuanzzs-syts">剩余27天</span>
						
						</a>
						
							<span class="xuanzzs-fuk" zhensuoid="327">付款</span>
						
						</div>
					
					<div class="s-create-clinic">
						<a href="toChuangjianzs.jsp">
							<table width="100%" height="100%">
						        <tr>
						            <td align="center" class="xiaz1">
						               <img src="../static/image/chuangjzs-jh.png"/>
						               <div style="color:#666;margin-top: 5px;">创建诊所</div>
						            </td>
						        </tr>
						    </table>
						</a>
					</div>
				</div>
				<div class="clinic-info">
					<span>加入诊所</span>
				</div>
				<div class="ccinfo-main clearfix">
				
				</div>
		</div>
		</div>
	</div>
	
	<script type="text/javascript">
		$(function(){
			$("#helloworld").css({"border-bottom":"solid 4px #097c25","height":"60px","display":"inline-block"});
		});
		function getrenyuan() {
		}
		var zuozhenzs = '[]';
	    	if(zuozhenzs.length<=2){
				$(".clinic-info").css("display","none");
	        	}
	    $(".s-clinic-name").each(function(index){//获取序号
        $(".s-clinic-name a").click(function(){
        	$(this).css("border","none");
        	$(this).css("border","solid 1px #00adf5");
        });
    	});
    	//点击付款按钮
	    $(document).on('click','.xuanzzs-fuk',function(){
        	var zhensuoid = $(this).attr('zhensuoid');
        	window.location.href= path+'/jump/toXufei?yemianrk=xuanzezs'+'&zhensuoid='+zhensuoid;
        	return false;
        });
        var path = '';
        var sjc = 'null';
        var msg = 'null';
        msg=decodeURI(decodeURI(msg));
        if(msg!=null&&msg!='null'){
        	notifySuccess(msg,sjc);
        }
        	// 判断该诊所是否开启医保
		function validateYiBaoZs(zhensuoid) {
			$.ajax({
				type: 'post',
				url: path + '/zsShezhi/validateYiBaoZs',
				data: {'zhensuoid': zhensuoid},
				async: false,
				success: function(data) {
					if (data == true) {
						$('#yb-init').trigger('click');
					}
				}
			});
		}
        
        //点击诊所
        $(document).on('click','.toZhensuoIndex',function(){
            var obj = $(this);
        	var zhensuoid = $(this).attr('id');
        	var leixing = $(this).attr('leixing');
        	if(leixing == 'zuozhen'){
        		$.ajax({
					url: path + '/zhensuo/getZhensuozt',
					type:'GET',
					data:{id:zhensuoid},
					success:function(result) {
						if(result != 'success') {
							notifyWarning(result+'已经到期');
						}else{
							validateYiBaoZs(zhensuoid);
							window.location.href= path+'/zhensuo/toZhensuoIndex?id='+zhensuoid+'&type='+leixing+'&jinrusj='+new Date().getTime() + "&rukou=1";
						}
					}
				});
           	}else{
           		validateYiBaoZs(zhensuoid);
           		window.location.href= path+'/zhensuo/toZhensuoIndex?id='+zhensuoid+'&type='+leixing+'&jinrusj='+new Date().getTime() + "&rukou=1";
            }
        	
        });
        $("#m-message").mouseover(function(){
        	$("#m-message i").removeClass("fa-caret-right").addClass("fa-caret-down");
        }).mouseout(function(){
        	$("#m-message i").removeClass("fa-caret-down").addClass("fa-caret-right");
        });
	</script>
</body>
</html>
